package com.itheima.commom;

public class CodeBlock2 {
    //实例代码块
    private String name;
    {
        name = "张三";
        System.out.println("实例代码块");
    }
    public String getName() {
        return name;
    }
    public static void main(String[] args) {
        System.out.println("main方法");
        CodeBlock2 codeBlock2 = new CodeBlock2();
        System.out.println(codeBlock2.getName());
    }
}
